package com.caipos.service.impl;

import com.caipos.actor.common.data.EventInfo;
import com.caipos.actor.common.data.StringUtils;
import com.caipos.actor.common.data.event.Event;
import com.caipos.actor.common.data.event.RuleNodeDebugEvent;
import com.caipos.actor.common.data.id.EntityId;
import com.caipos.service.EventService;
import com.google.common.util.concurrent.ListenableFuture;
import lombok.extern.slf4j.Slf4j;
import org.apache.catalina.LifecycleEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import javax.xml.stream.EventFilter;
import java.util.List;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
import java.util.stream.Collectors;

@Service
@Slf4j
public class BaseEventService implements EventService {

    @Value("${sql.ttl.events.events_ttl:0}")
    private long ttlInSec;
    @Value("${sql.ttl.events.debug_events_ttl:604800}")
    private long debugTtlInSec;

    @Value("${event.debug.max-symbols:4096}")
    private int maxDebugEventSymbols;


    @Override
    public ListenableFuture<Void> saveAsync(Event event) {
//        eventValidator.validate(event, Event::getTenantId);
//        checkAndTruncateDebugEvent(event);
//        return eventDao.saveAsync(event);
        return null;
    }

}
